<div class="task">
<?php include ('buttons.tpl'); ?>
</div>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<h2><?php echo $heading_title; ?></h2>
<div class="description"><?php echo $heading_description; ?></div>

<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
  <div id="tabs">
	<ul>
	  <li><a href="#tabs-1"><?php echo $tab_general; ?></a></li>
	  <li><a href="#tabs-2"><?php echo $tab_data; ?></a></li>
	</ul>
	<div id="tabs-1">
      <?php foreach ($downloads as $download) { ?>
      <fieldset>
        <legend><?php echo $download['language']; ?></legend>
        <table>
          <tr>
            <td width="185"><span class="required">*</span> <?php echo $entry_name; ?></td>
            <td><input name="language[<?php echo $download['language_id']; ?>][name]" value="<?php echo $download['name']; ?>" />
              <?php if ($error_name) { ?>
              <span class="error"><?php echo $error_name; ?></span>
              <?php } ?></td>
          </tr>
        </table>
      </fieldset>
      <?php } ?>
  	</div>
    <div id="tabs-2">
      <table>
        <tr>
          <td width="185"><?php echo $entry_filename; ?></td>
          <td><input type="file" name="download" />
            <?php if ($error_file) { ?>
            <span class="error"><?php echo $error_file; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_mask; ?></td>
          <td><input type="input" name="mask" value="<?php echo $mask; ?>" />
            <?php if ($error_mask) { ?>
            <span class="error"><?php echo $error_mask; ?></span>
            <?php } ?></td>
        </tr>
        <tr>
          <td><?php echo $entry_remaining; ?></td>
          <td><input type="input" name="remaining" value="<?php echo $remaining; ?>" size="6" /></td>
        </tr>
      </table>
    </div>
  </div>
  <script type="text/javascript"><!--
	$(function() {
		$("#tabs").tabs();
	});
  //--></script>
</form>
